/*
 * Copyright (c) 2013, Ivan Babushkin.
 */
package asngen.core;

import java.io.IOException;

public class AsnInteger extends AsnObject {
    private long leftBound, rightBound;
    private long value;

    public AsnInteger(long leftBound, long rightBound, long value) {
        this.value = value;
        this.leftBound = leftBound;
        this.rightBound = rightBound;
    }

    public AsnInteger(Decoder decoder, long leftBound, long rightBound)
            throws IOException {
        value = decoder.decodeInteger(leftBound, rightBound);
        this.rightBound = rightBound;
        this.leftBound = leftBound;
    }

    public long getValue() {
        return value;
    }

    public long getLeftBound() {
        return leftBound;
    }

    public long getRightBound() {
        return rightBound;
    }
}

